<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>superDrive</title>
    <link rel="icon" th:href="@{/ico/title.ico}" type="image/x-icon"/>
    <link rel="bookmark" th:href="@{/ico/title.ico}" type="image/x-icon"/>
    <link rel="stylesheet" th:href="@{/css/loginandreg.css}">
    <script type="text/javascript" th:src="@{/js/jquery-3.6.0.js}"></script>
    <script>
        window.onload = function () {
            //;layui操作结果反馈
            var layer = layui.layer;
            if (top.location!==self.location) {
                top.location=self.location;
            }
            var resultTip = document.getElementById("resultTip");
            if (resultTip.innerText!==""&&resultTip.innerText!=null){
                layer.msg(resultTip.innerText);
            }
        }
        $(function() {
            //防止页面后退
            history.pushState(null, null, document.URL);
            window.addEventListener('popstate', function () {
                history.pushState(null, null, document.URL);
            });
        })
    </script>
</head>
<body>
<span id="resultTip" style="display: none;position: absolute" th:text="${status}"></span>
    <div class="showlogo">
        <img th:src="@{/img/face.png}" height="547.2" width="868.8"/>
    </div>
    <div class="loginform">
        <div id="box01" class="box01">
            <img th:src="@{/img/logo.png}" height="48" width="216"/>
            <div class="form-reg-login" id="form-reg-login">
                <div class="titletip">
                    <span id="login01" href="">验证登录</span>
                    <span id="login02" href="">密码登录</span>
                    <span id="reg01" href="">游客登录</span>
                </div>
                <div id="form01">
                    <form th:action="@{/user/loginandreg}" method="post" onsubmit="return submit01()">
                        <input id="email" name="username" type="email" oninput="replace(this)" placeholder="请输入邮箱"><br>
                        <input id="code" name="code" type="password" oninput="replace(this)" placeholder="请输入验证码">
                        <button id="getcode">获取验证码</button>
                        <input id="loginsub" type="submit" value="登录"><br>
                        <input id="checkboxyes" type="checkbox"><br>
                        <span id="agree01">未注册邮箱登录时会自动创建新账号，
                            我已阅读并<br>同意 <a style="color: #637DFF">服务协议</a>和
                            <a style="color: #637DFF">隐私权条款</a></span>
                    </form>
                </div>
                <div id="form02">
                    <form th:action="@{/user/login}" method="post" onsubmit="return submit03()">
                        <input id="username" name="username" oninput="replace(this)" type="text" placeholder="请输入邮箱账号"><br>
                        <input id="password" name="password" oninput="replace(this)" type="password" placeholder="请输入密码"><br><br>
                        <input id="loginsub01" type="submit" value="登录">
                    </form>
                </div>
                <div id="form03">
                    <form th:action="@{/user/yklogin}" method="get">
                        <img id="yktou" th:src="@{/img/tou.jpg}" alt="">
                        <input id="loginsub02" type="submit" value="游客登录">
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" th:src="@{/js/loginandreg.js}"></script>
    <script type="text/javascript" th:src="@{/layui/layui.js}"></script>
</body>
</html>